 <%@ page language="java" contentType="text/html; charset=UTF-8"       
    pageEncoding="UTF-8"%> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>        
<%
	String basePath = request.getContextPath() + "/";
%>        
 <!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>工单录入</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/reset.css"/>
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/display.css"/>
		<!--[if lt IE 9]><script src="<%=basePath %>js/html5.js"></script><![endif]-->				
	</head>
	<body  onload="javascript:parent.window.scrollTo(0,0);">
		<div class="formWrap">
			<div class="listSearch-title pen-title">
			<h5>工单处理</h5>
			<span class="addTime">创建于<fmt:formatDate  value="${cussWorkOrder.createTime}" pattern="yyyy-MM-dd:HH:mm:ss"></fmt:formatDate></span>
			<c:if test="${cussWorkOrder.urgentPriority=='10'}"><div class="priority low"></div></c:if>
			<c:if test="${cussWorkOrder.urgentPriority=='30'}"><div class="priority normal"></div></c:if>
			<c:if test="${cussWorkOrder.urgentPriority=='50'}"><div class="priority urgent"></div></c:if>
			<c:if test="${cussWorkOrder.urgentPriority=='70'}"><div class="priority veryUrgent"></div></c:if>
			</div>
		    <input id="idWorkOrder" type="hidden" value="${cussWorkOrder.idWorkOrder}"></input>
		    <input id="typeIdHidden" type="hidden" value="${cussWorkOrder.typeId}"></input>
		    <input id="channelSourceHidden" type="hidden"  value="${cussWorkOrder.channelSource}"></input>		    
			<input id="opType" type="hidden" value="${opType}"></input>
			<input id="dealType" type="hidden" ></input>
			<table cellpadding="0" cellspacing="0" border="0" class="form-table">
				<tr>
					<td class="form-title">工单流水号：</td>
					<td   class="form-input"><span id="serialNumber" >${cussWorkOrder.serialNumber}</span></td>
					<td class="form-title">工单类型：</td>
					<td  class="form-input"><span id="typeId" >${cussWorkOrder.typeName}</span></td>
				    <td class="form-title">渠道来源：</td>
				    <td class="form-input"><span id="channelSource"  >
				    ${cussWorkOrder.channelSource=='1'?'客户录入':(cussWorkOrder.channelSource=='2'?'电话接听':'系统监控')}</span></td>
				</tr>
				<tr>
					<td class="form-title">客户帐号：</td>
					<td class="form-input"><span id="custName" >${cussWorkOrder.customerName}</span></td>
					<td class="form-title">客户联系电话：</td>
					<td class="form-input"><span   id="custTel"  >${cussWorkOrder.customerPhone}</span></td>
					<td class="form-title">客户邮件：</td>
					<td class="form-input"><span id="custMail" ></span></td>
				</tr>
				<tr>
					<td class="form-title">订单编号：</td>
					<td class="form-input"><span  id="cussOrderCode" >${cussWorkOrder.orderNum}</span></td>
					<td class="form-title">指派处理人：</td>
					<td class="form-input"><!-- <select  class="select w160" id="workOrderHandlerUm"></select> --><span  id="workOrderHandlerUm" >${cussWorkOrder.currOperatorUm}</span></td>
					<td class="form-title">紧急度：</td>							
					<td><span>${cussWorkOrder.urgentName}</span>					
					</td>
				</tr>
				<tr>
					<td class="form-title">问题描述：</td>
					<td colspan="5" class="form-input">
						<span>${cussWorkOrder.issuDesc}</span>
					</td>
				</tr>				
				<tr>
					<td class="form-title">反馈结果：</td>
					<td colspan="5" class="form-input"><span>${cussWorkOrder.feedbackToCustomer}</span></td>
				</tr>				
				<!-- 历史记录 start -->
				<tr>
					<td colspan="6">
						<div class="replyTop clearfix">
							<h4>工单处理记录</h4>
							<!-- <button class="btn-form fr">提交</button> -->
							<div align="right" >
							   <c:if test="${cussWorkOrder.workOrderStatus =='9'}">
                                <button style='width: 80px;' onclick="cussWorkOrderDeal('approved')" class="btn-form">审核通过</button>&nbsp;
								<button style='width: 100px;' onclick="cussWorkOrderDeal('unapproved')" class="btn-form">审核不通过</button>&nbsp;&nbsp;								
							   </c:if>
							   <c:if test="${cussWorkOrder.workOrderStatus =='8'}">
							   <button style='width: 80px;' onclick="cussWorkOrderDeal('reOpen')" class="btn-form">重新打开</button>&nbsp;&nbsp;&nbsp;&nbsp;
							   </c:if>
							</div>
						</div>						
						<div class="replyList"   id="replyList"></div>					
					</td>
				</tr>
				<!-- 历史记录 end -->
			</table>
		</div>
	</body>	
<!--插件引用-->
<script id="table-template" type="text/x-handlebars-template">	       
				  {{#if results}}
		                {{#each results}}
			             <div class="reply-item clearfix">
								<div class="reply-head">
									<img src="<%=basePath %>image/reply-head.jpg" width="46" height="46">
                                    <div class="reply-head-role">{{#showRoleName creatorRole}}{{/showRoleName}}</div>
								</div>
								<div class="reply-info">
									<p>
										<span class="reply-name">{{creator}}</span> <span class="reply-company ml10 mr10">{{creatorName}}</span> <span class="reply-addTime">{{showDateFormat createTime}}</span>
									</p>
									<p class="reply-content">
										{{{operateFlowLog}}}
									</p>
								</div>
							</div> 
		               {{/each}} 
	               {{else}}
	                  <tr><td> 暂无处理数据！</td></tr>
	               {{/if}}				
		      <!-- {{#if results}}                             
		              <tr>  
						<td colspan="3">
							<p style="float:left;">
								一共 {{totalRecord}} 条记录&nbsp;|&nbsp;分 {{totalPage}} 页&nbsp;|&nbsp;每页 {{pageSize}} 条记录
							</p>
						</td>
						<td colspan="5">	
							<p style="float:right;">
		
		       {{#compare currentPage 1}}
		           <span  onclick="queryDealRecordsPageOp(1)">首页</span>
		           <span  onclick="queryDealRecordsPageOp({{currentPage}}-1)">上一页</span>
		       {{else}}
		           <span class="pageText pageDisable">首页</span>
		           <span class="pageText pageDisable">上一页</span> 
		       {{/compare}}
		      
		       {{#list listbegin listend currentPage}}                                                            
		       {{/list}}
		          
		       {{#compare2 currentPage totalPage}}  
		           <span  onclick="queryDealRecordsPageOp({{currentPage}}+1)">下一页</span>
		           <span  onclick="queryDealRecordsPageOp({{totalPage}})">末页</span>
		       {{else}}
		           <span class="pageText pageDisable">下一页</span>
		           <span class="pageText pageDisable">末页</span>  
		       {{/compare2}}        
							</p>
						</td>
					</tr>
		      {{/if}}	-->			
</script>
	<script src="<%=basePath %>js/jquery.min.js"></script>
	<script src="<%=basePath %>/js/plugin/artDialog/artDialog.source.js?skin=chrome"></script>
    <script src="<%=basePath %>/js/plugin/artDialog/plugins/iframeTools.source.js"></script>
    <script src="<%=basePath %>js/common.js"></script>	
	<script src="<%=basePath %>js/handlebars-1.0.0.beta.6.js"></script>	
	<script src="<%=basePath %>js/dateFormat.js"></script>	
	<script src="<%=basePath %>js/work_order_deal.js"></script>		
</html>